package com.ruoyi.work.domain.vo;

import com.ruoyi.work.domain.enums.CheckType;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @Author: MMDZ
 * @Desc:
 */
@Data
public class WorkFillDetailVo implements Serializable {
    private static final long serialVersionUID = 1L;

    /** 工时填报 */
    private Long fillDetailId;

    /** 工时填报 */
    private Long fillId;

    /** 项目ID */
    @NotNull(message = "项目代码不能为空")
    private Long projectId;
    private String projectCode;

    /** 阶段ID */
    @NotNull(message = "开发阶段不能为空")
    private Long stageId;
    private String stageName;

    /** 事务种类ID */
    @NotNull(message = "事务种类不能为空")
    private Long officeId;
    private String officeName;

    /** 开发工作日期 */
    @NotNull(message = "开发工作日期不能为空")
    private Date workTime;

    /** 工时（H） */
    @NotNull(message = "工时为空")
    private Double workHour;

    /** 工作备注 */
    private String workRemark;

    /** 审核状态: 回退、待审核、已审核 */
    private Integer fillState;
    private String fillStateName;

    /** 回退原因 */
    private String rollback;

    public Integer getFillState() {
        this.fillStateName = CheckType.get(fillState);
        return fillState;
    }
}
